cmake_minimum_required(VERSION 3.0)
project(MyRPC)

# 设置cmake中c++标准
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)

# 查找protobuf包
find_package(Protobuf REQUIRED)
# 设置protobuf头文件所在的目录
include_directories(${Protobuf_INCLUDE_DIRS})

set(
    LIBS
    protobuf
    pthread
    zookeeper_mt
    muduo_net
    muduo_base
    glog
)

# 增加子目录，寻找子目录中的CMakeLists.txt并构建
add_subdirectory(src)
add_subdirectory(example)
